package CreativePattern.BuilderPattern;
//建造者模式 (Builder)
public class TestBuilder {
    public static void main(String[] args) {
        Computer gamingPC = new Computer.ComputerBuilder()
                .setCPU("Intel Core i9")
                .setGPU("NVIDIA RTX 3080")
                .setRAM(32)
                .setStorage(1024)
                .build();

        Computer officePC = new Computer.ComputerBuilder()
                .setCPU("Intel Core i5")
                .setGPU("Integrated Graphics")
                .setRAM(16)
                .setStorage(512)
                .setPeripheralDevice("leisheng","leisheng","leisheng")
                .build();
        System.out.println(gamingPC);
        System.out.println(officePC);

    }
}
